var Event = new Vue();

Vue.component('marry',{
    template:`
      <div>
            我说:<input @keyup="on_change" v-model="i_said">{{ i_said }}
      </div>
     `,
    methods:{
        on_change: function (){
            Event.$emit("marry_said",this.i_said);
        }
    },
    data:function(){
        return {
            i_said:'',
        };
    },
    //监听点
    mounted:function(){
        var me =this;
        Event.$on('marry_said',function(data){
            me.marry_said=data
        });
    }
});
Vue.component('black',{
    template:`
      <div>
            black说:{{ black_said }}
      </div>
     `,
    data:function(){
        return {
            black_said:'',
        }
    }
});
new Vue({
    el:"#app",
});
